package com.seavenois.alife2;

import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.webkit.WebView;
import android.widget.ImageButton;

/*************************************************/
/* Ask the user for a donation *******************/
/*************************************************/
/* Contains a Paypal button and a short note *****/
/*************************************************/
public class Donate extends Activity{
	WebView webview;
	
	// Sets the PayPal button. The rest is set from the xml layout
	@Override 
	public void onCreate(Bundle savedInstanceState) { 
		super.onCreate(savedInstanceState);
		setContentView(R.layout.donate); 
		ImageButton btn = (ImageButton)findViewById(R.id.donateButton);
		Uri uriUrl = Uri.parse("https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7WSR6PUW94Q84");
		final Intent launchBrowser = new Intent(Intent.ACTION_VIEW, uriUrl); 
		btn.setOnClickListener(new OnClickListener(){
			public void onClick(View v){
				startActivity(launchBrowser);  
			}
		});
	}
}